<template>
  <div class="form-item">
    <el-form-item :label="config.label" :required="config.require">
      <el-checkbox-group value="">
        <el-checkbox v-for="(item,index) in config.child" :key="index" :label="item.value">{{item.label}}</el-checkbox>
      </el-checkbox-group>
    </el-form-item>
  </div>
</template>
<script>
    import Vue from 'vue';
    import {CheckboxGroup, Checkbox, FormItem} from 'element-ui';

    Vue.use(CheckboxGroup);
    Vue.use(Checkbox);
    Vue.use(FormItem);

    export default {
        name: 'Checkbox',
        data() {
            return {}
        },
        props: {
            config: {
                type: Object,
                default: () => {
                  return {}
                }
            }
        }
    }
</script>
<style lang="less" scoped>
  @import "checkbox.less";
</style>
